//对外暴露路由（常量路由）
import GlobalLayoutVue from "@/components/layout/GlobalLayout.vue";
export const constRoutes = [
  {
    path: "/",
    component: GlobalLayoutVue,
    redirect: "/home",
    children: [
      {
        path: "/home",
        name: "首页",
        component: () => import("@/views/home/HomeIndex.vue"),
      },
    ],
  },
  {
    path: "/user",
    name: "用户模块",
    component: () => import("@/App.vue"),
    children: [
      {
        path: "/user/login",
        name: "登录",
        component: () => import("@/views/login/UserLogin.vue"),
      },
    ],
  },
  {
    path: "/dev",
    component: GlobalLayoutVue,
    name: "设备模块",
    redirect: "/dev/list",
    children: [
      {
        path: "/dev/list",
        name: "设备列表",
        component: () => import("@/views/dev/DevList.vue"),
      },
      {
        path: "/dev/export",
        name: "设备导出",
        component: () => import("@/views/dev/DevExport.vue"),
      },
    ],
  },
  {
    path: "/map",
    component: GlobalLayoutVue,
    name: "地图模块",
    redirect: "/map/analysis",
    children: [
      {
        path: "/map/analysis",
        name: "地图分析",
        component: () => import("@/views/map/DevMap.vue"),
      },
    ],
  },
  {
    path: "/remote",
    component: GlobalLayoutVue,
    children: [
      {
        path: "/remote/remoteCheck",
        name: "远程遥测",
        component: () => import("@/views/monitor/RemoteCheck.vue"),
      },
    ],
  },
  {
    path: "/404",
    name: "404页面",
    component: () => import("@/views/404/Error404.vue"),
  },
  {
    path: "/:pathMatch(.*)*",
    redirect: "/404",
    name: "其他的不存在的路由",
  },
];
